﻿<!-- #include file="mymin.asp" -->
<%
Dim submit
submit = Request("submit")
If submit <> "" Then
	'----------------------------------------------------------------
	'	生成style.asp/css.asp文件
	'----------------------------------------------------------------
	Dim HU_Config,HU_File,HU_CssConfig,HU_CssFile

	HU_File= "../../config/style.asp"'生成style.asp文件路径
	HU_CssFile= "../../config/css.asp"'生成css.asp文件路径
	Dim bc,bi,fs,mc,mb,nc,nb,lc,lh,tc,oc,ce
	If submit = "pink" Then
		bc = "#EAEAEA"
		' bi = "images/bg.gif"
		fs = "14"
		mc = "#FFFFFF"
		mb = "#C6C6C6"
		nc = "#FFFBE1"
		nb = "#FEBF90"
		lc = "#0A63BB"
		lh = "#DE0000"
		tc = "#DE0000"
		oc = "#EAEAEA"
		ce = ""
	Elseif submit = "golden" Then 
		bc = "#EAEAEA"
		' bi = "images/bg.gif"
		fs = "14"
		mc = "#FFFFFF"
		mb = "#C6C6C6"
		nc = "#FFFF66"
		nb = "#DABF34"
		lc = "#996600"
		lh = "#FF6600"
		tc = "#DE0000"
		oc = "#F7EDBC"
		ce = ""
	Elseif submit = "green" Then 
		bc = "#CCE8CF"
		' bi = "images/bg.gif"
		fs = "14"
		mc = "#FFFFFF"
		mb = "#C6C6C6"
		nc = "#B4FCAF"
		nb = "#00CC00"
		lc = "#336600"
		lh = "#000000"
		tc = "#DE0000"
		oc = "#CCE8CF"
		ce = ""
	Elseif submit = "blue" Then 
		bc = "#EAEAEA"
		' bi = "images/bg.gif"
		fs = "14"
		mc = "#FFFFFF"
		mb = "#C6C6C6"
		nc = "#E3F5FD"
		nb = "#3FB3FF"
		lc = "#106EB4"
		lh = "#000000"
		tc = "#DE0000"
		oc = "#E3F5FD"
		ce = "a:hover{text-decoration:none;}"
	Elseif submit = "gray" Then 
		bc = "#EAEAEA"
		' bi = ""
		fs = "14"
		mc = "#EAEAEA"
		mb = "#C6C6C6"
		nc = "#EAEAEA"
		nb = "#808080"
		lc = "#808080"
		lh = "#000000"
		tc = "#808080"
		oc = "#EAEAEA"
		ce = ""
	Elseif submit = "black" Then 
		bc = "#0A0A0A"
		' bi = ""
		fs = "14"
		mc = "#000000"
		mb = "#000000"
		nc = "#000000"
		nb = "#FFFF00"
		lc = "#00FF00"
		lh = "#8000FF"
		tc = "#FF0000"
		oc = "#212121"
		ce = "body{color:#FFFFFF;}input{background: #EAEAEA;}"
	Elseif submit = "white" Then 
		bc = ""
		' bi = ""
		fs = ""
		mc = ""
		mb = ""
		nc = ""
		nb = ""
		lc = ""
		lh = ""
		tc = ""
		oc = ""
		ce = ""
	Else
		bc = forQuote(Request.Form("styleBodyColor"))
		' bi = forQuote(Request.Form("styleBodyImage"))
		fs = forQuote(Request.Form("styleFontSize"))
		mc = forQuote(Request.Form("styleMainColor"))
		mb = forQuote(Request.Form("styleMainBorder"))
		nc = forQuote(Request.Form("styleNavColor"))
		nb = forQuote(Request.Form("styleNavBorder"))
		lc = forQuote(Request.Form("styleLinkColor"))
		lh = forQuote(Request.Form("styleLinkHover"))
		tc = forQuote(Request.Form("styleTipColor"))
		oc = forQuote(Request.Form("styleOddColor"))
		ce = forQuote(Request.Form("styleCssExtend"))
	End If
	' if len(Request.Form("numTitle"))<1 then
		' Call Error2("<card title='出错'><p>请输入！")
	' end if

	HU_Config="<"&"%"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleBodyColor="""&bc&""" '网站背景颜色"
	' HU_Config=HU_Config+chr(13)&chr(10)&"styleBodyImage="""&bi&""" '网站背景图片"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleFontSize="""&fs&""" '网站字体大小"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleMainColor="""&mc&""" '面板背景颜色"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleMainBorder="""&mb&""" '面板边框颜色"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleNavColor="""&nc&""" '导航背景颜色"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleNavBorder="""&nb&""" '导航边框颜色"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleLinkColor="""&lc&""" '链接初始颜色"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleLinkHover="""&lh&""" '链接选中颜色"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleTipColor="""&tc&""" '提示标语颜色"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleOddColor="""&oc&""" '列表基层颜色"
	HU_Config=HU_Config+chr(13)&chr(10)&"styleCssExtend="""&ce&""" 'Css样式扩展"
	HU_Config=HU_Config+chr(13)&chr(10)&"%"&">"
	
	Dim bodywidth,mainwidth,fontsize,bodycolor,bodyimage,maincolor,mainborder,navcolor,navborder,linkcolor,linkhover,tipcolor,oddcolor,cssextend
	If wapStyle="2" Then bodywidth="width:250px;":mainwidth="width:240px;"
	If fs<>"" Then fontsize = "font-size:"&fs&"px;"
	If bc<>"" Then bodycolor = "background-color:"&bc&";"
	' If bi<>"" And Replace(bi,"/","")<>"" Then bodyimage = "background-image:url('"&bi&"');"
	If mc<>"" Then maincolor = "background:"&mc&";"
	If mb<>"" Then mainborder = "border:1px solid "&mb&";"
	If nc<>"" Then navcolor = "background:"&nc&";"
	If nb<>"" Then navborder = "border-top:1px solid "&nb&";border-bottom:1px solid "&nb&";"
	If lc<>"" Then linkcolor = "color:"&lc&";"
	If lh<>"" Then linkhover = "color:"&lh&";"
	If tc<>"" Then tipcolor = "color:"&tc&";"
	If oc<>"" Then oddcolor = "background:"&oc&";"
	If ce<>"" Then cssextend = ce
	HU_CssConfig = "<"&"%"&chr(13)&chr(10)&_
	  "cssStyle=""body{text-align:center;margin:0 auto;padding:0px;font-family:Verdana,Arial,Helvetica,sans-serif;"&fontsize&bodycolor&bodyimage&bodywidth&"}"&_
	  ".main{text-align:left;word-wrap:break-word;overflow:hidden;padding:5px;"&maincolor&mainborder&mainwidth&"}"&_
	  ".nav{padding:1px;"&navcolor&navborder&"}"&_
	  ".tle{font-weight:bold;text-align:center}"&_
	  ".odd{padding:3px;"&oddcolor&"}"&_
	  ".even{padding:3px}"&_
	  "a{text-decoration:none;"&linkcolor&"}"&_
	  "a:hover{text-decoration:underline;"&linkhover&"}"&_
	  "img,a img{border:none;padding:0 2px 0 1px;}"&_
	  "input,div{margin:1px 0 1px 0;}"&_
	  "form{margin:0px;display:inline}"&_
	  ".tip{"&tipcolor&"}"&cssextend&""" 'Css样式"&_
	  chr(13)&chr(10)&"%"&">"
	Call savetofile(HU_Config,HU_File)
	Call savetofile(HU_CssConfig,HU_CssFile)
	Response.Write "<meta http-equiv=""refresh"" content=""1;url=index.asp?sid="&sid&"""><title>网站主题配置</title></head><body><div class=""main320"">"
	Response.Write "成功设置！正在返回..."

else%>
<title>网站主题配置</title></head><body><div class="main400">
<form method="post" action="style.asp">
网站背景颜色:<input name="styleBodyColor" type="text" value="<%=styleBodyColor%>"/><br/>
网站字体大小:<input name="styleFontSize" type="text" value="<%=styleFontSize%>"/><br/>
面板背景颜色:<input name="styleMainColor" type="text" value="<%=styleMainColor%>"/><br/>
面板边框颜色:<input name="styleMainBorder" type="text" value="<%=styleMainBorder%>"/><br/>
导航背景颜色:<input name="styleNavColor" type="text" value="<%=styleNavColor%>"/><br/>
导航边框颜色:<input name="styleNavBorder" type="text" value="<%=styleNavBorder%>"/><br/>
链接初始颜色:<input name="styleLinkColor" type="text" value="<%=styleLinkColor%>"/><br/>
链接选中颜色:<input name="styleLinkHover" type="text" value="<%=styleLinkHover%>"/><br/>
提示标语颜色:<input name="styleTipColor" type="text" value="<%=styleTipColor%>"/><br/>
列表基层颜色:<input name="styleOddColor" type="text" value="<%=styleOddColor%>"/><br/>
CSS样式扩展:<br/><textarea name="styleCssExtend" cols="45" rows="10"><%=nowml(styleCssExtend)%></textarea><br/>
<input type="hidden" name="submit" value="1"/>
<input type="hidden" name="sid" value="<%=sid%>"/>
<input type="submit" value="保存配置"/>
</form>
温馨提示：<br/>
CSS写法：.em{color:#FFFFFF;}<br/>
对应UBB：[div=em]内容[/div]<br/><br/>
【七色主题】<br/>
<a href="styleok.asp?submit=pink&amp;sid=<%=sid%>">粉墨登场</a> <a href="styleok.asp?submit=white&amp;sid=<%=sid%>">朴实无华</a><br/>
<a href="styleok.asp?submit=golden&amp;sid=<%=sid%>">金秋收获</a> <a href="styleok.asp?submit=black&amp;sid=<%=sid%>">黑色醒目</a><br/>
<a href="styleok.asp?submit=blue&amp;sid=<%=sid%>">蓝色畅想</a> <a href="styleok.asp?submit=green&amp;sid=<%=sid%>">绿色护眼</a><br/>
<a href="styleok.asp?submit=gray&amp;sid=<%=sid%>">灰色记忆</a><br/>
<%end if%><br/>
<a href="index.asp?sid=<%=sid%>">[网站配置]</a><%call Last2%>